Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code page support to JvCreateProcess for stdout and stderr #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

owlsperspective
Copy link

When JvCreateProcess receives messages from stdout and stderr of a console application, I want to be able to apply a specified codepage to the content instead of the default codepage.
On Windows 11 24H2, netsh.exe now outputs messages in UTF-8 instead of ANSI. In the Japanese (CP932) environment, localized messages are output in UTF-8, but when converting from AnsiString to (Unicode)String, the default codepage (932) is applied, resulting in incorrect conversion (garbled characters).
Add the CodePage property to JvCreateProcess and apply the received message to the specified codepage before converting it to UnicodeString.
You can set the codepage to 65001 (UTF-8) to ensure proper conversion when a console application outputs messages in UTF-8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant